using AutoMapper;
using B.S.XZYData.Api.Read.Dto.WorkOrder;
using B.S.XZYData.Domain.LJC;

namespace B.S.XZYData.Api.Read.Profiles
{
    /// <summary>
    /// 工单AutoMapper映射配置
    /// </summary>
    public class WorkOrderProfile : Profile
    {
        public WorkOrderProfile()
        {
            // WorkOrderModel -> WorkOrderDto
            CreateMap<WorkOrderModel, WorkOrderDto>();

            // WorkOrderModel -> WorkOrderDetailDto
            CreateMap<WorkOrderModel, WorkOrderDetailDto>();

            // WorkOrderProcessModel -> WorkOrderProcessDto
            CreateMap<WorkOrderProcessModel, WorkOrderProcessDto>();

            // WorkOrderAssignModel -> WorkOrderAssignDto
            CreateMap<WorkOrderAssignModel, WorkOrderAssignDto>();

            // RouteStepModel -> RouteStepSelectDto
            CreateMap<RouteStepModel, RouteStepSelectDto>()
                .ForMember(dest => dest.DefectSequence, opt => opt.Ignore()); // 暂时忽略不良品序列字段
        }
    }
}
